package ink.metoo.gude.module.security.domain.dto

import ink.metoo.gude.util.RegexUtils
import jakarta.validation.constraints.Email
import jakarta.validation.constraints.NotBlank
import jakarta.validation.constraints.Pattern

class RegisterDTO {

    var nickname: String = ""

    @NotBlank
    @Pattern(
        regexp = RegexUtils.ACCOUNT_PATTERN,
        message = "账号长度不能小于1位，且只能包含数字、字母、下划线"
    )
    var account: String = ""

    @NotBlank
    @Pattern(
        regexp = RegexUtils.BASIC_PASSWORD_PATTERN,
        message = "密码长度不能小于8位，且必须包英文和数字"
    )
    var password: String = ""

    @NotBlank
    @Email
    var email: String = ""

    @NotBlank
    var verificationCode: String = ""


}